package org.sample.config.client.controller;

import org.sample.config.client.utils.ApplicationContextUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

//    @Value("${data.env}")
//    String env;

    @GetMapping("/test")
    public String test(){
        return "Hello!My env is: "+
                ApplicationContextUtil.applicationContext
                        .getEnvironment().getProperty("data.env");
//        return "Hello!My env is: "+env;
    }
}
